{% load static %}

<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <title>{% block Title %}

            {% endblock %}
    </title>


    {% block css %}

    {% endblock %}

    <script>
  // 放在页面最顶部（head 里）
  const isLogin = {{ user.is_authenticated|yesno:"true,false" }};
</script>
    <link rel="stylesheet" href="{% static 'bootstrap-3.4.1-dist/bootstrap-3.4.1-dist/css/bootstrap.min.css' %}">
    <link rel="stylesheet" href="{% static 'css/navigation-styles.css' %}?v=20241219">
</head>



<body>
  {% include 'base/nav.html' %}
{% csrf_token %}
<script>
  const csrfToken = $('[name=csrfmiddlewaretoken]').val();   // 取令牌
  console.log(csrfToken);
</script>



  {% block main %}

{% endblock %}



<script src="{% static 'bootstrap-3.4.1-dist/jquery-3.7.1.min.js' %}"></script>
<script src="{% static 'bootstrap-3.4.1-dist/bootstrap-3.4.1-dist/js/bootstrap.min.js' %}"></script>



  {% block js %}

    {% endblock %}

<!-- 全局分类筛选功能 -->
<script>
$(document).ready(function() {
    // 分类筛选功能 - 全局可用
    $('.classify-btn').on('click', function(e) {
        e.preventDefault();
        const id = $(this).data('id');
        
        // 跳转到首页并筛选分类
        window.location.href = '{% url "main:index" %}?classify=' + id;
    });
});
</script>






</body>
</html>